<!--<template>-->
<!--    <ckeditor style="min-height: 200px; max-height: 620px; border: 1px solid #ccc;"-->
<!--              :editor="editor" @ready="onReady" v-model="contentData" :config="editorConfig"-->
<!--              @input="$emit('input',$event)">-->
<!--    </ckeditor>-->
<!--</template>-->

<!--<script>-->
<!--    // import ClassicEditor from '@ckeditor/ckeditor5-build-classic';-->
<!--    // import HtmlComment from '@ckeditor/ckeditor5-html-support/src/htmlcomment';-->
<!--    import DecoupledEditor from '@ckeditor/ckeditor5-build-decoupled-document';-->
<!--    import '@ckeditor/ckeditor5-build-classic/build/translations/zh-cn'-->
<!--    import {uploadWithImage} from "../api/star_horse";-->

<!--    export default {-->
<!--        name: "CmsEditor",-->

<!--        props: {-->
<!--            content: {-->
<!--                required: true,-->
<!--                type: String,-->
<!--                default() {-->
<!--                    return ''-->
<!--                }-->
<!--            },-->
<!--            uploadImgHook: {-->
<!--                type: Function,-->
<!--                default() {-->
<!--                    return () => {-->
<!--                        console.error("undefined uploadImg Hook")-->
<!--                    }-->
<!--                }-->
<!--            }-->
<!--        },-->
<!--        computed: {-->
<!--            contentData() {-->
<!--                return this.content-->
<!--            }-->
<!--        },-->
<!--        data() {-->
<!--            return {-->
<!--                editor: DecoupledEditor,-->
<!--                editorConfig: {-->
<!--                    // plugins:[HtmlComment,-->
<!--                    //     Code,-->
<!--                    //     CodeBlock,-->
<!--                    //     Underline,-->
<!--                    //     ImageResize,-->
<!--                    //     TodoList-->
<!--                    //     ],-->
<!--                    language: "zh-cn",-->
<!--                    fontSize: {-->
<!--                        options: [8, 10, 'default', 14, 16, 18, 20, 22, 24, 26, 28, 32, 48]-->
<!--                    },-->
<!--                    fontFamily: {-->
<!--                        options: ["宋体", "仿宋", "微软雅黑", "黑体", "仿宋_GB2312", "楷体", "隶书", "幼圆"]-->
<!--                    }-->
<!--                }-->
<!--            }-->
<!--        },-->
<!--        methods: {-->
<!--            onReady(editor) {-->
<!--                // Insert the toolbar before the editable area.-->
<!--                editor.ui.getEditableElement().parentElement.insertBefore(-->
<!--                    editor.ui.view.toolbar.element,-->
<!--                    editor.ui.getEditableElement()-->
<!--                );-->
<!--                editor.plugins.get('FileRepository').createUploadAdapter = loader => {-->
<!--                    //let val = editor.getData();-->
<!--                    return {-->
<!--                        upload: async () => {-->
<!--                            return await loader.file.then(f => {-->
<!--                                const F = new FileReader();-->
<!--                                F.readAsArrayBuffer(f);-->
<!--                                console.log(f)-->
<!--                                return new Promise(resolve => {-->
<!--                                    F.onload = function () {-->
<!--                                        resolve({bufAsArray: F.result, file: f})-->
<!--                                    };-->
<!--                                })-->
<!--                            }).then(v => {-->
<!--                                //执行上传上传-->
<!--                                console.log(v);-->
<!--                                const data = new FormData();-->
<!--                                data.append("files", v.file);-->
<!--                                uploadWithImage("/admin/admin.php?action=upload", data).then(res => {-->
<!--                                    let path = res.data.data.path;-->
<!--                                    this.uploadImgHook(path);-->
<!--                                    return path;-->
<!--                                });-->

<!--                                //返回标准格式-->
<!--                                /*return {-->
<!--                                    default: 'http://mmcl.maoming.gov.cn/ys/css/img/BG.png'-->
<!--                                }*/-->
<!--                            });-->

<!--                        }-->
<!--                    }-->
<!--                };-->
<!--            }-->
<!--        }-->
<!--    }-->
<!--</script>-->
<!--<style scoped>-->
<!--</style>-->